//
//  DHMagazine_LargeCell.m
//  Dresshere
//
//  Created by ZhangPeng on 2018/4/14.
//  Copyright © 2018年 张朋. All rights reserved.
//

#import "DHMagazine_LargeCell.h"

@implementation DHMagazine_LargeCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)updateCell:(NSDictionary *)model{
    [self.imgView dh_setImageURLString:[model objectForKey:@"cover"]];
    self.titleLabel.text = [model objectForKey:@"title"];
    self.likeLabel.text = [NSString stringWithFormat:@"%@",[model objectForKey:@"collected_count"]? : @"0"];
    self.commentLabel.text = [NSString stringWithFormat:@"%@",[model objectForKey:@"comments_count"]? : @"0"];
    if ([[model objectForKey:@"niced_by_self"] boolValue]) {
        [self.likeImageView setImage:[UIImage imageNamed:@"magazine_like"]];
    }else{
        [self.likeImageView setImage:[UIImage imageNamed:@"magazine_unlike"]];
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
